//
//  Mahua.h
//  KL
//
//  Created by mac on 15/12/14.
//  Copyright © 2015年 zhouxubin. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>
#import <MJExtension.h>
#import <MJRefresh.h>
#import "ZBNetWorkTool.h"
#import "User.h"
#import "Votes.h"
#import "KLImageSize.h"

typedef void(^finishedBlock)(NSArray *arrayData);

@interface Mahua : NSObject
/*
 "format": "word",
 "image": null,
 "published_at": 1449978304,
 "tag": "",
 "user": {
 "avatar_updated_at": 1449564743,
 "last_visited_at": 1402933897,
 "created_at": 1402933897,
 "state": "bonding",
 "email": "751183298@qq.com",
 "last_device": "android_3.0.0",
 "role": "n",
 "login": "你是过客不曾停留",
 "id": 17001605,
 "icon": "20151208085223.jpg"
 },
 "image_size": null,
 "id": 114232411,
 "votes": {
 "down": -103,
 "up": 2117
 },
 "created_at": 1449977044,
 "content": "中午吃完饭我躺在桌子上睡着了！刚刚睁眼偷瞄了一下时间，我竟然在公司睡了一下午。我窃喜啊！在QQ上和另一个同事说，我睡一下午，都没被发现！她说刚刚领导来叫你两遍了，都没给你叫醒。。。",
 "state": "publish",
 "comments_count": 92,
 "allow_comment": true,
 "share_count": 102,
 "type": "hot"
 */
/** 笑话样式 */
@property (nonatomic, copy) NSString *format;
/** 配图的url */
@property (nonatomic, copy) NSString *image;
/** 发布时间 */
@property (nonatomic, assign) int published_at;
/** 笑话的id,配图需要用到这个 */
@property (nonatomic, copy) NSString *ID;
/** 笑话的id,前5位 */
@property (nonatomic, copy) NSString *prefixID;
/** 文本内容 */
@property (nonatomic, copy) NSString *content;
/** 评论数量 */
@property (nonatomic, assign) int comments_count;
/** 分享数量 */
@property (nonatomic, assign) int share_count;
/** 用户 */
@property (nonatomic, strong) User *user;
/** 喜欢和不喜欢 */
@property (nonatomic, strong) Votes *votes;
/** 刷新的数量 */
@property (nonatomic, assign) int refresh;
/** 图片的尺寸 */
@property (nonatomic, strong) KLImageSize *image_size;
/** 获取微博部分数据,正文 */
@property (nonatomic, copy) NSString *wbody;

/** 请求数据 */
+ (void)mahuaWithUrlString:(NSString *)urlString index:(NSInteger)index page:(NSInteger)page finishedBlock:(finishedBlock)finishedBlock;
/** 从沙盒里获取数据 */
+ (NSArray *)mahuasWith:(NSInteger)index;

@end
